﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SyncApplication.Controls
{
    public partial class AnimationTask : UserControl
    {
        public AnimationTask()
        {
            InitializeComponent();
            pictureBox1.Visible = false;
        }
        public void Start()
        {
            timer1.Enabled = true;
            pictureBox1.Visible = false;
        }
        public void Stop()
        {
            timer1.Stop();            
        }
        public Image Image
        {
            get
            {
                return pictureBox1.Image;
            }
            set
            {
                pictureBox1.Image = value;
            }
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            circularProgress1.IsRunning = true;
            if (circularProgress1.Value == circularProgress1.Maximum)
                circularProgress1.Value = 0;
        }
    }
}
